package com.bw.finance.controller;


import com.bw.finance.conf.ResponseResult;
import com.bw.finance.eneity.locana.EbankGuarantee;
import com.bw.finance.eneity.locana.res.Borrowinfo;
import com.bw.finance.service.IEbankGuaranteeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zxx
 * @since 2020-08-19
 */
@RestController
@RequestMapping("/guarantee")
public class EbankGuaranteeController {
    @Autowired
    private IEbankGuaranteeService guaranteeService;

    @GetMapping("/findgrt")
    public ResponseResult findgrt() {
        ResponseResult result = ResponseResult.SUCCESS();
        try {
            List<EbankGuarantee> list = guaranteeService.list();
            result.setResult(list);
        }catch (Exception e){
            result.setSuccess(false);
            result.setMessage("查询失败"+e.toString());
        }
        return result;
    }
}
